Visit us at - https://github.com/supercoderz
pyeurofx is a library that allows you to fetch the close prices of various majot currencies vs the Euro. The library provides simple functions that you can invoke and get the data as list of tuples or as pandas data frames.
pyeurofx makes use of the following libraries -
The data is fetched from the following XML sources -
In [2]:
from eurofx import *
You can get the daily data or the historical data. Daily data will be the close price released at 3 PM CET on that day or the prevvious day depending on when you are running the call. Historical close prices will be the close prices for all the days since 1 Apr 1999
The daily data is returned as a list of tuples - each tuple is a currency, date, rate pair.
daily = get_daily_data() print daily
In [3]:
historical = get_historical_data()
print historical.__len__()
The first date of historical data
In [4]:
print historical[-1:]
In [5]:
daily_df = get_daily_data_df()
print daily_df
In [6]:
historical_df = get_historical_data_df()
print historical_df.head()
In [ ]:
import matplotlib.pyplot as plt
In [7]:
plt.plot(historical_df['USD'])
Out[7]: